package cn.lj.ykt.constant;

public enum ErrorCode {

    NetworkError("50000", "网络异常"),

    SUCCESS("20000", "成功"),

    PARAM_ERROR("40000", "参数错误"),

    USER_NOT_EXIST("40001", "用户不存在"),

    USER_EXIST("40002", "用户已存在"),

    USER_NOT_LOGIN("40003", "用户未登录"),

    USER_NOT_AUTH("40004", "用户未授权"),

    USER_NOT_ADMIN("40005", "用户不是管理员");

    private String code;

    private String message;

    ErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
